import java.util.Scanner;


public class P1003 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		double num;
		while((num=in.nextDouble())!=0.00){
			System.out.println(numOfCard(num)+" card(s)");
		}
	}
	public static int numOfCard(double length){
		double product =0;
		for(int i=1;i<=276;i++) {
			product+=1.0/(i+1);
			if(product>length){
				return i;
			}
		}
		return 0;
	}

}
